package org.jeecg.modules.zonglzp.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.zonglzp.entity.BusinesswaterEntity;
import org.jeecg.modules.zonglzp.entity.store;
import org.springframework.stereotype.Repository;

import java.util.Map;

@Mapper
@Repository
public interface BusinesswaterMapper {

    //获取我的报表
    IPage<BusinesswaterEntity> getBusinesswater(Page<BusinesswaterEntity> page, @Param("starttime") String starttime, @Param("endtime") String endtime, @Param("storeCode") String storeCode, @Param("userid") String userid,@Param("orgCode") String orgCode,@Param("storeId") String storeId);

    //查询账号充值页面的金额内容
    Map<String, Object> getmoneydetail(@Param("token") String token);

    //账号充值页面某日流水明细
    IPage<BusinesswaterEntity> getonedaydetail(Page<BusinesswaterEntity> page, @Param("userid") String userid, @Param("today") String today, @Param("starttime") String starttime, @Param("endtime") String endtime);

    //已完成或未完成业务流水查询 面料的
    IPage<BusinesswaterEntity> getmianliaobill(Page<BusinesswaterEntity> page, @Param("starttime") String starttime, @Param("endtime") String endtime, @Param("storeCode") String storeCode, @Param("userid") String userid, @Param("ddstatus") int ddstatus);

    //已完成或者未完成业务流水查询 个订的
    IPage<BusinesswaterEntity> getgedingbill(Page<BusinesswaterEntity> page, @Param("starttime") String starttime, @Param("endtime") String endtime, @Param("storeCode") String storeCode, @Param("userid") String userid, @Param("ddstatus") int ddstatus);

    //查询我的报表 完成或者未完成
    IPage<BusinesswaterEntity> getBusinesswatertwo(Page<BusinesswaterEntity> page, @Param("starttime") String starttime, @Param("endtime") String endtime, @Param("storeCode") String storeCode, @Param("userid") String userid, @Param("ddstatus") int ddstatus,@Param("orgCode") String orgCode,@Param("storeId") String storeId);

    //查询已完成和未完成的金额
    Double moneyStatistics(@Param("starttime") String starttime, @Param("endtime") String endtime, @Param("storeCode") String storeCode, @Param("userid") String userid, @Param("ddstatus") int ddstatus, @Param("orgCode") String orgCode, @Param("storeId") String storeId);

    store getstoreDetailByorderSn(@Param("orderSn") String orderSn);

    //通过门店编号查询门店名称
    String getstoreNamebyStoreCode(@Param("storeId") String storeId);
}
